<!doctype html>
<html lang="zh">
<head>
    <tc_include file="Public:head" />
    <title>{$site_seo_title} {$site_name}</title>
    <meta name="keywords" content="{$site_seo_keywords}" />
    <meta name="description" content="{$site_seo_description}">
  <style>
    .list-content a{
      color: #747474;
    }
    .news-details-list a:hover{
      color: #fc1919 !important;
    }
    #menu-item-3 .triangle_border_up{
      display: block;
    }
  </style>
</head>
<body>
<!--导航条开始-->
<tc_include file="Public:nav" />
<!--导航条结束-->
<div class="container">
  <div class="index-title business-title">
    <div class="news-details-left">
      <span class="business-logo"></span>
      <span class="yewu">客户案例</span>
    </div>
  </div>
  <div class="row customer-row"> 
    <div class="col-md-2 col-sm-2 col-xs-6 customer-col item">
      <a href="{:leuu('portal/list/index',array('id'=>2))}" class="customer-active all">全部</a>
    </div>
    <php>
      $terms = sp_get_child_terms($cat_id);
      if($term_id == null){
        $cases = sp_sql_posts_paged_bycatid($cat_id,"order:post_date DESC;",8);
      }else{
        $cases = sp_sql_posts_paged_bycatid($term_id,"order:post_date DESC;",8);
      }
    </php>
    <foreach name="terms" item="item">
    <div class="col-md-2 col-sm-2 col-xs-6 customer-col item">
      <a href="{:leuu('portal/list/index',array('id'=>2,'term_id'=> $item['term_id']))}"
         class="app_{$item.term_id}" >{$item.name}</a>
    </div>
    </foreach>
  </div>
  <div class="row customer-row">

    <foreach name="cases['posts']" item="vo">
      <php>
        $smeta=json_decode($vo['smeta'], true);
      </php>
    <div class="col-md-3 col-sm-6 col-xs-12 customer-col list">
      <div class="customer-img">
        <img src="{:sp_get_asset_upload_path($smeta['thumb'])}">
      </div>
      <p class="customer-text">{$vo.post_title}</p>
      <div class="customer-detail">
        <a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}"><span>了解详情+</span></a><!--{:leuu('article/index',array('id'=>$vo['tid']))}-->
      </div>
    </div>
    </foreach>
  </div>
  <!--分页开始-->
  <div class="tcdPageCode"><ul>{$cases['page']}</ul></div>
  <!--分页结束-->
</div>
<!--footer开始-->
<tc_include file="Public:footer"/>
<!--footer结束-->
<tc_include file="Public:scripts"/>
</body>
<script>
  $(function(){

    function GetQueryString(name)
    {
      var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
      var r = window.location.search.substr(1).match(reg);
      if(r!=null)return  unescape(r[2]); return null;
    }
    var key=GetQueryString("term_id");
    if(key !=null && key.toString().length > 1)
    {
        $(".app_"+key).addClass('customer-active').siblings().removeClass('customer-active');
        $(".all").removeClass('customer-active');
    }
    /*responseImage();*/
  });
  /*function responseImage() {
    $(".response-image").each(function () {
      var img = $(this).children("img");
      var imgAttr = img.attr("src");
      img.hide();
      $(this).css("background-image", "url(" + imgAttr + ")");
    });
  }*/
</script>
</html>